added Feb 2001 SDK
[windows-sources.git] / shared source / sscli20 / samples / compilers / myc / src / myc.cs
bloba48012a72fd0e39b5267c12c69a16577ea1ab0c7
1 //------------------------------------------------------------------------------
2 // <copyright file="myc.cs" company="Microsoft">
3 //
4 // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
5 //
6 // The use and distribution terms for this software are contained in the file
7 // named license.txt, which can be found in the root of this distribution.
8 // By using this software in any fashion, you are agreeing to be bound by the
9 // terms of this license.
10 //
11 // You must not remove this notice, or any other, from this software.
12 //
13 // </copyright>
14 //------------------------------------------------------------------------------
16 namespace MyC
20 * My simple C compiler
22 * Brad Merrill
23 * 17-Apr-1999
25 using System;
27 public class MyC
29 public const int MAXBUF = 512;
30 public const int MAXSTR = 128;
32 /* main program */
33 public static void Main()
35 try
37 String[] args = Environment.GetCommandLineArgs();
38 Io prog = new Io(args);
39 Tok tok = new Tok(prog);
40 Parse p = new Parse(prog, tok);
41 p.program();
42 prog.Finish();
44 catch (Exception e)
46 Console.WriteLine("Compiler aborting: "+e.ToString());